# -*- coding:utf-8 -*-
__author__ = "daoyu"
__date__ = "2023-6-29"
__doc__ = "封装pyyaml"

import yaml

class YamlClient:

    def load_yaml(self, path):
        """
            加载path路径下的yaml文件，获取文件内容
        """
        with open(path, mode="r", encoding="utf-8") as f:
            data = yaml.load(stream=f.read(), Loader=yaml.FullLoader)
        return data
    
if __name__ == "__main__":
    data = YamlClient().load_yaml(r"conf\mysql_config.yaml")
    print(data)